import { createStore } from "vuex";
export default createStore({
  state: {
    applyFieldIndex: 0,
    newsIndex: 0,
    isShow: true
  },
  mutations: {
    SET_APPLY_INDEX: (state, v) => {
      state.applyFieldIndex = v
    },
    SET_NEWS_INDEX: (state, v) => {
      state.newsIndex = v
    },
    SET_IS_SHOW: (state, v) => {
      state.isShow = v
    },
  },
  actions: {
    setApplyIndex({ commit }, v) {
      commit('SET_APPLY_INDEX', v)
    },
    setNewsIndex({ commit }, v) {
      commit('SET_NEWS_INDEX', v)
    },
    setIsShow({ commit }, v) {
      commit("SET_IS_SHOW", v);
    },
  },
  modules: {}
})